package com.tuniu.agents.common.entity.cart;

import java.util.List;

import com.tuniu.agents.util.I18nUtil;

public class TrainCartItem extends CartItem<TrainCartItem> {

    private String departureTime;
    private String duration;
    private String trainNum;
    private String destStationName;
    private List<SeatType> trainType;
    private String edzSeatType;
    private String arrivalTime;
    private String price;
    private String departStationName;
    private ItemUrl url;

    public String getDepartureTime() {
        return departureTime;
    }

    public void setDepartureTime(String departureTime) {
        this.departureTime = departureTime;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getTrainNum() {
        return trainNum;
    }

    public void setTrainNum(String trainNum) {
        this.trainNum = trainNum;
    }

    public String getDestStationName() {
        return destStationName;
    }

    public void setDestStationName(String destStationName) {
        this.destStationName = destStationName;
    }

    public List<SeatType> getTrainType() {
        return trainType;
    }

    public void setTrainType(List<SeatType> trainType) {
        this.trainType = trainType;
    }

    public String getEdzSeatType() {
        return edzSeatType;
    }

    public void setEdzSeatType(String edzSeatType) {
        this.edzSeatType = edzSeatType;
    }

    public String getArrivalTime() {
        return arrivalTime;
    }

    public void setArrivalTime(String arrivalTime) {
        this.arrivalTime = arrivalTime;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getDepartStationName() {
        return departStationName;
    }

    public void setDepartStationName(String departStationName) {
        this.departStationName = departStationName;
    }

    public ItemUrl getUrl() {
        return url;
    }

    public void setUrl(ItemUrl url) {
        this.url = url;
    }


    public static class SeatType {
        private String seatType;
        private int leftNumber;
        private String leftNumberDesc;
        private String seatName;

        public String getSeatType() {
            return seatType;
        }

        public void setSeatType(String seatType) {
            this.seatType = seatType;
        }

        public int getLeftNumber() {
            return leftNumber;
        }

        public void setLeftNumber(int leftNumber) {
            this.leftNumber = leftNumber;
        }

        public String getLeftNumberDesc() {
            return leftNumberDesc;
        }

        public void setLeftNumberDesc(String leftNumberDesc) {
            this.leftNumberDesc = leftNumberDesc;
        }

        public String getSeatName() {
            return seatName;
        }

        public void setSeatName(String seatName) {
            this.seatName = seatName;
        }

        @Override
        public String toString() {
            return "{" +
                    "\""+I18nUtil.getMessage(CartItemConstant.TRAIN_SEAT_TYPE)+"\":" + seatType +
                    ",\""+I18nUtil.getMessage(CartItemConstant.TRAIN_LEFT_NUMBER)+"\":" + leftNumber +
                    ",\""+I18nUtil.getMessage(CartItemConstant.TRAIN_LEFT_NUMBER_DESC)+"\":" + leftNumberDesc +
                    ",\""+I18nUtil.getMessage(CartItemConstant.TRAIN_SEAT_NAME)+"\":" + seatName +
                    '}';
        }
    }

    @Override
    public String toString() {
        return '{' +
                "\""+I18nUtil.getMessage(CartItemConstant.TRAIN_DEPARTURE_TIME)+"\":" + departureTime + '\"' +
                ",\""+I18nUtil.getMessage(CartItemConstant.TRAIN_DURATION)+"\":" + duration + '\"' +
                ",\""+I18nUtil.getMessage(CartItemConstant.TRAIN_TRAIN_NUMBER)+"\":" + trainNum + '\"' +
                ",\""+I18nUtil.getMessage(CartItemConstant.TRAIN_DESTINATION_STATION_NAME)+"\":" + destStationName + '\"' +
                ",\""+I18nUtil.getMessage(CartItemConstant.TRAIN_ARRIVAL_TIME)+"\":" + arrivalTime + '\"' +
                ",\""+I18nUtil.getMessage(CartItemConstant.TRAIN_PRICE)+"\":" + price + '\"' +
                ",\""+I18nUtil.getMessage(CartItemConstant.TRAIN_DEPARTURE_STATION_NAME)+"\":" + departStationName + '\"' +
                '}';
    }
}